#!/bin/bash
ZabbixServerIP=192.168.236.131

rpm -i zabbix-agent2-5.4.9-1.el7.x86_64.rpm

sed -i "s/Server\s*=.*/Server=${ZabbixServerIP}/g" /etc/zabbix/zabbix_agent2.conf

systemctl restart zabbix-agent2
systemctl enable zabbix-agent2